<!--layout buttons : Dang_ki - Dang_nhap - Thoat -->
<div id="login_button">
    <table id="button_head_2">
        <tr>
            <td> <a href="index.php?route=account/create">Đăng kí</a></td>
            <td> <a href="index.php?route=account/login">Đăng nhập</a> </td>
            <td> <a href="index.php?route=account/account">Thông tin tài khoản</a> </td>
            <td> <a href="index.php?route=account/logout">Thoát</a> </td>
        </tr>
    </table>
</div>

<div id="introduce_button">
    <table id="button_head_1">
        <tr>
            <td><a href="index.php">Trang chủ</a></td>
            <td><a href="index.php?route=about/introduce">Giới thiệu</a></td>
            <td><a href="http://99xu.vn/news">Tin tức</a></td>
        </tr>
    </table>
</div>

<div id="search">  
    <!--
<input id="input_search" type="text" name="search_value"/>
    -->
    <?php if ($keyword) { ?>
        <input type="text" onFocus="this.value=''" value="<?php echo $keyword; ?>" id="filter_keyword" />
    <?php } else { ?>
        <input type="text" value="Tìm sản phẩm..." id="filter_keyword" onclick="this.value = '';" onkeydown="this.style.color = '#000000'" style="color: #999;" />
    <?php } ?>
    <a id="button_search" onclick="moduleSearch();" href="#" 
       style="
       float: right;
       height: 100%;
       background: url(catalog/view/theme/mobile/default/images/search.png) repeat-x center; /* Old browsers */
       "></a> 
</div>
<div id="breadcrumb" style="">
    <?php
    //$br = sizeof($breadcrumbs);
    //if ($br > 0) {
    ?>    
    <?php //echo $breadcrumbs[$br-1]['separator']; ?><a href="<?php //echo $breadcrumbs[$br-1]['href']; ?>"><?php //echo $breadcrumbs[$br-1]['text']; ?></a>


    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
</div>

<script type="text/javascript"><!--
    $('#search input').keydown(function(e) {
        if (e.keyCode == 13) {
            moduleSearch();
        }
    });

    function moduleSearch() {
        url = 'index.php?route=product/search';

        var filter_keyword = $('#filter_keyword').attr('value')

        if (filter_keyword) {
            url += '&keyword=' + encodeURIComponent(filter_keyword);
        }

        var filter_category_id = $('#filter_category_id').attr('value');

        if (filter_category_id) {
            url += '&category_id=' + filter_category_id;
        }

        location = url;
    }
    //--></script>
